class person:
    def __init__(self, name, gender, age, calls, brand, battery_capacity, screen, standby_time, integral):
        self.name = name
        self.gender = gender
        self.age = age
        self.calls = calls
        self.brand = brand
        self.battery_capacity = battery_capacity
        self.screen = screen
        self.standby_time = standby_time
        self.integral = integral

    def message(self, message):
        print(f"{self.name}发短信说：{message}")

    def call(self, phone_number, time):
        if phone_number != None:
            if self.calls >= 1:
                print(f"{self.name}成功打电话给{phone_number}")
                if time > 0 & time <= 10:
                    self.calls -= time
                    self.integral += 15 * time
                elif time > 10 & time <= 20:
                    self.calls -= 0.8 * time
                    self.integral += 39 * time
                else:
                    self.calls -= 0.65 * time
                    self.integral += 48 * time
            else:
                print("话费余额不足")
        else:
            print("号码为空")
